package com.example.mapper;

import com.example.entity.TUser;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author example
 * @since 2018-12-11
 */
public interface TUserMapper extends BaseMapper<TUser> {
	@Select("<script>" 
			+ "SELECT * FROM t_user u LEFT JOIN t_device_category d ON"
			+ " u.user_id = d.create_user WHERE u.user_id = #{userId}" 
			+ "</script>")
	List<Map<String, Object>> getMultiTablePageCondition(Page<Map<String, Object>> page, @Param("userId") Long userId);
}
